package test0110;

// 能看懂程序实现什么功能吗?
public class Java10 {
    public static void main(String[] args) {
        System.out.println(m(""));
        System.out.println(m("r"));
        System.out.println(m("racecar"));
        System.out.println(m("racer"));
    }

    public static boolean m(String input) {
        if (input.length() <= 1) {
            return true;
        } else {
            return (input.charAt(0) == input.charAt(input.length() - 1)) && m(input.substring(1, input.length() - 1));
        }
    }
}
